import { io } from "socket.io-client";

const socket = io("http://localhost:9678");

class MessageSocket {
    emit(eventName, data) {
        socket.emit(eventName, data);
    }
    on(eventName) {
        let data = ''
        socket.on(eventName, (e) => {
            return e
        });
        return data
    }

}

const messageSocket = new MessageSocket()

export default messageSocket
